<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册页面</title>
    <link rel="stylesheet" href="/static/plugins/bootstrap-3.3.7-dist/css/bootstrap.css">
    <link rel="stylesheet" href="/static/css/signin.css">
    <style>
        p {
            color: red;
            text-align: center;
        }
    </style>
</head>
<body>

<div class="container">
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                        aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/user/home/">单词助手</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                    {% if request.user.is_authenticated %}
                        <li><a href="/user/mydetail/">{{ request.user.username }}</a></li>
                        <li><a href="/user/logout/">注销</a></li>
                    {% else %}
                        <li><a href="/user/login/">登录</a></li>
                        <li><a href="/user/register/">注册</a></li>
                    {% endif %}


                </ul>
            </div>
        </div>
    </nav>

    <form class="form-signin" action="" method="POST">
        {% csrf_token %}
        <h2 class="form-signin-heading">请输入用户名和密码</h2>
        <label for="inputUsername" class="sr-only">用户名</label>
        <input type="text" id="inputUsername" name="user" class="form-control" placeholder="username" required=""
               autofocus="">
        <label for="inputPassword" class="sr-only">密码</label>
        <input type="password" name="pwd" id="inputPassword" class="form-control" placeholder="Password" required="">
        <button class="btn btn-lg btn-primary btn-block" type="submit">注册</button>
    </form>
</div>
<p>{{ error }}</p>

</body>
</html>